# Maintainer: Anatol Pomozov
# Contributor: therojam <archlinux@therojam.xyz>

pkgname=yubikey-full-disk-encryption
_commit=dcaac005b10eac132ac663c268318bd909bf027c
pkgver=r155.dcaac00
pkgrel=1
pkgdesc='Use YubiKey to unlock a LUKS partition'
arch=(any)
url='https://github.com/agherzan/yubikey-full-disk-encryption'
license=(Apache)
depends=(yubikey-personalization cryptsetup)
optdepends=('ykchalresp-nfc: NFC support'
            'udisks2: use ykfde-open without root'
            'expect: use ykfde-open without root')
makedepends=(git)
backup=(etc/ykfde.conf)
source=(git+https://github.com/agherzan/yubikey-full-disk-encryption.git#commit=$_commit)
sha256sums=('SKIP')

pkgver() {
  cd yubikey-full-disk-encryption
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

package() {
  cd yubikey-full-disk-encryption
  make DESTDIR="$pkgdir" install
}
